<?php

namespace App\Http\Presenters\Biz;

use Laracasts\Presenter\Presenter;

class ShopPresenter extends Presenter
{
    /**
     * Present a link to the user gravatar
     */    

    public function shopStatus()
    {
        switch ($this->status) 
        {
            case SHOP_STATUS_CLOSE:
                return '<span class="grey"><i class="ace-icon fa fa-circle status" data-id="'.$this->id.'"></i></span>';
                break;
            case SHOP_STATUS_NORMAL:
                return '<span class="green"><i class="ace-icon fa fa-circle status" data-id="'.$this->id.'"></i></span>';
                break;            
            case SHOP_STATUS_CHECKING:
                return '<span class="blue"><i class="ace-icon fa fa-play status" data-id="'.$this->id.'"></i></span>';
                break;
            case SHOP_STATUS_FAILURE:
                return '<span class="red"><i class="ace-icon fa fa-close bigger-120 status" data-id="'.$this->id.'"></i></span>';
                break;
        }
    }


    public function shopProgress()
    {
        switch ($this->progress) 
        {
            case SHOP_PROGRESS_BEGIN:
                return '<span class="grey"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe995;</i></span>';
                break;
            case SHOP_PROGRESS_CONTRACT:
                return '<span class="blue"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe984;</i></span>';
                break;
            case SHOP_PROGRESS_DOCUMENT:
                return '<span class="red"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe99b;</i></span>';
                break;
            case SHOP_PROGRESS_PRODUCT:
                return '<span class="brown"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe99e;</i></span>';
                break;
            case SHOP_PROGRESS_ONLINE:
                return '<span class="green"><i class="ace-icon fa fa-check" data-id="'.$this->id.'"></i></span>';
                break;
        }
    }


    public function shopTrade()
    {
        switch ($this->trade) 
        {
            case SHOP_TRADE_OWN:
                return '<span class="green"><i class="iconfont" data-id="'.$this->id.'">&#xe86d;</i></span>';
                break;
            case SHOP_TRADE_SELF:
                return '<span class="blue"><i class="iconfont" data-id="'.$this->id.'">&#xe858;</i></span>';
                break;
            case SHOP_TRADE_DIRECT:
                return '<span class="purple"><i class="iconfont" data-id="'.$this->id.'">&#xe865;</i></span>';
                break;
            case SHOP_TRADE_CHAIN:
                return '<span class="red"><i class="iconfont" data-id="'.$this->id.'">&#xe623;</i></span>';
                break;
        }
    }


    public function shopProgressLabel()
    {
        switch ($this->progress) 
        {
            case SHOP_PROGRESS_BEGIN:
                return '<span class="grey"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe995;</i>合作洽谈</span>';
                break;
            case SHOP_PROGRESS_CONTRACT:
                return '<span class="blue"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe984;</i>合同已签</span>';
                break;
            case SHOP_PROGRESS_DOCUMENT:
                return '<span class="red"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe99b;</i>文案完成</span>';
                break;
            case SHOP_PROGRESS_PRODUCT:
                return '<span class="brown"><i class="iconfont bigger-120" data-id="'.$this->id.'">&#xe99e;</i>产品制作</span>';
                break;
            case SHOP_PROGRESS_ONLINE:
                return '<span class="green"><i class="ace-icon fa fa-check" data-id="'.$this->id.'"></i>门店上线</span>';
                break;
        }
    }


}
